chrome.storage.local.get('proxy', function({proxy}) {
	var pacScript_data = `function FindProxyForURL() {
	return "${proxy}; DIRECT";
}`

	chrome.proxy.settings.set(
		{
			value: {
				mode: 'pac_script',
				pacScript: {
					data: pacScript_data
				}
			},
			scope: 'regular'
		}, function (){
			//chrome.action.setBadgeText({text: "run"});
		}
	);

	console.log(pacScript_data);
});